#! /usr/bin/python
# Filename: referance.py

'''Use the reference as a example.

notice that both shoplist and mylist both print the same list,
as they point to the same object.'''

print 'Simple Assignment';
shoplist = ['apple','mango','carrot','banana'];
mylist = shoplist;

del shoplist[0];

print 'shoplist is',shoplist;
print 'mylist is',mylist;

print 'Copy by making a full slice';
mylist = shoplist[:];
del mylist[0];

print 'shoplist is',shoplist;
print 'mylist is',mylist;

